home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -serious- / misc / mmulib / autodocs / 68040.doc next >
Text File  |  1999-11-29  |  3KB  |  85 lines

  1. TABLE OF CONTENTS
  2.  
  3. 68040.library/--Background--
  4. 68040.library/FPUControl
  5.  
  6. 68040.library/--Background--                    68040.library/--Background--
  7.  
  8.     PURPOSE
  9.  
  10.         This is the support library for 68040 based Amigas. Its purposes
  11.         are manifold:
  12.  
  13.         - Fixes and workarounds for several programs that typically appear
  14.           on 68040 based systems, mainly cache related.
  15.         - Replacement functions for exec.library CPU related functions.
  16.         - Loading and initialization of the FPSP68040 motorola software
  17.           module for emulation of FPU instructions not natively supported
  18.           by the 68040 internal FPU.
  19.         - Setup of the 68040 MMU and related functions of the exec library.
  20.         
  21.         The last step is not done by the 68040.library directly but by the
  22.         mmu.library which is loaded by the 68040.library on startup.
  23.  
  24.         Furthermore, this library provides user-callable functions. However,
  25.         even though they are documented, they shouldn't be called directly.
  26.         The recommended calling mechanism is not by using this library 
  27.         directly, but by calling the same vector of the 680x0.library which
  28.         does the same independent of the CPU installed in your system.
  29.  
  30. 68040.library/FPUControl                            68040.library/FPUControl
  31.  
  32.     NAME
  33.         FPUControl        -    control the generation of FPU exceptions
  34.  
  35.     SYNOPSIS
  36.         oldflags = FPUControl ( flags , mask );
  37.         d0                        d0        d1
  38.  
  39.         ULONG FPUControl ( ULONG , ULONG );
  40.  
  41.     FUNCTION
  42.         This function disables or enables various exceptions the 68040
  43.         FPU might generate. The purpose of this function is mainly to
  44.         enable workarounds for badly written software.
  45.  
  46.     INPUTS
  47.         flags        -    A ULONG bit mask of the exceptions to disable. A
  48.                         set bit disables the corresponding exception.
  49.         mask        -    A mask longword of the flags that are to be changed.
  50.                         A set bit indicates that the corresponding bit in
  51.                         flags mask is valid.
  52.  
  53.         The following bits are currently defined:
  54.  
  55.         FPUCtrlB_BSUN    0L        Disable the branch or set on unordered 
  56.                                 exception.
  57.         FPUCtrlB_INEX    1L        Disable the inexact result exception.
  58.         FPUCtrlB_DIVZ    2L        Disable the divide by zero exception.
  59.         FPUCtrlB_UNFL    3L        Disable the underflow exception.
  60.         FPUCtrlB_OVFL    4L        Disable the overflow exception.
  61.         FPUCtrlB_SNAN    5L        Disable the signalling NAN exception.
  62.         FPUCtrlB_OPERR    6L        Disable the operand error.
  63.  
  64.     RESULTS
  65.         the old settings of the exception mask.
  66.  
  67.     NOTES
  68.         This function should not be called directly. It is called indirectly
  69.         by the corresponding library function of the 680x0.library.
  70.  
  71.         This function does not alter the FPU status at all, it does not
  72.         even touch the FPU. All it does is that it sets certain control
  73.         bits in the 68040 library base which are interpreted by the
  74.         exception vectors installed by this library.
  75.  
  76.         Therefore, this library vector does nothing if someone altered the
  77.         FPU exception vectors manually.
  78.  
  79.     BUGS
  80.  
  81.     SEE ALSO
  82.         libraries/68040.library, libraries/680x0.library,
  83.         the Motorola 68040 manual.
  84.  
  85.